<?php
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.alert form').submit(function(){
	$.fn.yiiGridView.update('pidum-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<div class="container">

<!-- Info Blokcs -->
<div class="row">
    <!-- Welcome Block -->
    <div class="col-md-7">
       
    <div class="col-md-11" style="margin-top:25px;">
                <span class="spanjudulberita">
                   <h4><strong><?php echo "INFO PERKARA PIDANA UMUM"; ?></strong></h4>
                </span>
                <br />
                <br />
				<br />
                <span class="spandetailberita" style="font-size:10px;">
				<table>
					<tr>
						<td width=20%>Nomor Perkara</td>
						<td width=5%>:</td>
						<td width=75%><?php echo $model->jns_perkara; ?></td>
					</tr>
					<tr>
						<td width=20%>Jenis Perkara</td>
						<td width=5%>:</td>
						<td width=75%><?php echo $model->jns_perkara; ?></td>
					</tr>
					<tr>
						<td width=20%>Wilayah Hukum</td>
						<td width=5%>:</td>
						<td width=75%><?php echo $model->wilayah; ?></td>
					</tr>
					<tr>
						<td width=20%>No. Surat</td>
						<td width=5%>:</td>
						<td width=75%><?php echo $model->no_surat; ?></td>
					</tr>
					<tr>
						<td width=20%>Kasus Posisi</td>
						<td width=5%>:</td>
						<td width=75%><?php echo $model->kasus_posisi; ?></td>
					</tr>
					<tr>
						<td width=20%>JPU</td>
						<td width=5%>:</td>
						<td width=75%><?php 
						    $jpu = PdmJpu::model()->findAll('id_perkara='.$model->id);

							foreach($jpu as $row){
								echo $row -> nama;
								echo "<br />";
								}
						?>
						</td>
					</tr>
						<tr>
						<td width=20%>Surat Dakwaan</td>
						<td width=5%>:</td>
						<td width=75%><?php echo $model->surat_dakwaan; ?></td>
					</tr>
					<tr>
						<td width=20%>Tuntutan</td>
						<td width=5%>:</td>
						<td width=75%><?php echo $model->isi_tuntutan; ?></td>
					</tr>
					<tr>
						<td width=20%>Lama SPDP</td>
						<td width=5%>:</td>
						<td width=75%><?php echo $model->lama_spdp; ?> hari</td>
					</tr>
					<tr>
						<td width=20%>Lama Pra Penuntutan</td>
						<td width=5%>:</td>
						<td width=75%><?php echo $model->lama_pratut; ?> hari</td>
					</tr>
					<tr>
						<td width=20%>Lama Pra Penuntutan</td>
						<td width=5%>:</td>
						<td width=75%><?php echo $model->lama_tut; ?> hari</td>
					</tr>
						<tr>
						<td colspan=3><br /><br /><b>Data Terdakwa</b><br /></td>
					</tr>
						<?php 
						    $terdakwa = PdmTersangka::model()->findAll('id_perkara='.$model->id);
							$i=0;
							foreach($terdakwa as $row){
								$i++;
								echo "<tr><td colspan=3><b>Terdakwa ".$i . "</b></td></tr>";
								echo "<tr><td>Nama</td><td>:</td><td>";
								echo $row -> nama;
								echo "</td></tr>";
								echo "<tr><td>Tempat/Tgl Lahir</td><td>:</td><td>";
								echo $row -> tempat_lahir . "/" . $row -> tgl_lahir;
								echo "</td></tr>";
								echo "<tr><td>Jenis Kelamin</td><td>:</td><td>";
								echo $row -> sex;
								echo "</td></tr>";
								echo "<tr><td>Warga Negara</td><td>:</td><td>";
								echo $row -> warga_negara;
								echo "</td></tr>";
								echo "<tr><td>Tempat Tinggal</td><td>:</td><td>";
								echo $row -> tempat_tinggal;
								echo "</td></tr>";
								echo "<tr><td>Agama</td><td>:</td><td>";
								echo $row -> agama;
								echo "</td></tr>";
								echo "<tr><td>Pekerjaan</td><td>:</td><td>";
								echo $row -> pekerjaan;
								echo "</td></tr>";
								echo "<tr><td>Pendidikan</td><td>:</td><td>";
								echo $row -> pendidikan;
								echo "</td></tr>";
									echo "<tr><td>Pasal yang Dibuktikan</td><td>:</td><td>";
								echo $row -> pasal_bukti;
								echo "</td></tr>";
									echo "<tr><td>Pasal yang Didakwakan</td><td>:</td><td>";
								echo $row -> pasal_dakwaan;
								echo "</td></tr>";
									echo "<tr><td>Hal-hal yang Memberatkan</td><td>:</td><td>";
								echo $row -> hal_berat;
								echo "</td></tr>";
									echo "<tr><td>Hal-hal yang Meringankan</td><td>:</td><td>";
								echo $row -> hal_ringan;
								echo "</td></tr>";
									echo "<tr><td>Tuntutan Pidana</td><td>:</td><td>";
								echo $row -> tuntutan;
								echo "</td></tr>";
									echo "<tr><td>Amar Putusan PN</td><td>:</td><td>";
								echo $row -> amar_putusan;
								echo "</td></tr>";
									echo "<tr><td>Status</td><td>:</td><td>";
								echo $row -> status;
								echo "</td></tr>";
									echo "<tr><td>Tanggal Eksekusi</td><td>:</td><td>";
								echo $row -> tgl_eksekusi;
								echo "</td></tr>";
								echo "<tr><td colspan=3>&nbsp;</td></tr>";
								}
						?>
						</td>
					</tr>
				</table>
				<br />
				<br />
				</span>
            </div>
    </div>
    <!--/col-md-8-->

    <!-- column berita -->
    <div class="col-md-4">
        
       <div class="judul-index">
                  <h3>
                    <img id='img_16' src='<?php echo Yii::app()->request->baseUrl; ?>/images/index/index_48.jpg' border='0'  />
                    Berita
                  </h3>
        </div>

        <div class="div-indexpengumuman">
            <div class="div-indexpengumuman2">
            <?php
            $berita = Posting::model()->findAll(array("limit"=>5));

            foreach($berita as $row){
            ?>
            <div class="div-indexpengumuman3">
                <span class="tglpengumuman">
                    
                    <?php echo date('d-m-Y',strtotime($row->created_time)) ?>
                    
                </span>
                <br />
                
                <span class="judulpengumuman">
                    <a href="<?php echo Yii::app()->createUrl('posting/view',array('id'=>$row->id)); ?>" >
                    <?php echo $row->judul ?>
                    </a>
                </span>

            </div>    

            <hr class="hrpengumuman" />

            <?php
            }
            ?>

            <div class="div-buttonpengumuman" style="margin-left:-150px;margin-top:10px;">
			<a href="<?php echo Yii::app()->createUrl('posting/list'); ?>" >
                <img id='img_16' src='<?php echo Yii::app()->request->baseUrl; ?>/images/index/index_53.jpg' border='0'  />
			</a>	
            </div>

            </div>

        </div>
      
        <br />

        <div class="judul-index">
                  <h3>
                    <img id='img_16' src='<?php echo Yii::app()->request->baseUrl; ?>/images/index/index_51.jpg' border='0'  />
                    Pengumuman
                  </h3>
        </div>

         <div class="div-indexpengumuman">
            <div class="div-indexpengumuman2">
            
            <?php
            $pengumuman = Pengumuman::model()->findAll(array("limit"=>5));

            foreach($pengumuman as $rowPengumuman){
            ?>
            <div class="div-indexpengumuman3">
                <span class="tglpengumuman">
                    <a href="<?php echo Yii::app()->createUrl('pengumuman/view',array('id'=>$rowPengumuman->id)); ?>" >
                    <?php echo $rowPengumuman->judul_pengumuman; ?>
                    </a>
                </span>
                <br />
                <span class="judulpengumuman"><?php echo $rowPengumuman->isi; ?></span>
            </div>    

            <hr class="hrpengumuman" />

            <?php
            }
            ?>

            <div class="div-buttonpengumuman" style="margin-left:-150px;margin-top:10px;">
                <a href="<?php echo Yii::app()->createUrl('pengumuman/list'); ?>" >
				<img id='img_16' src='<?php echo Yii::app()->request->baseUrl; ?>/images/index/index_53.jpg' border='0'  />
				</a>
            </div>

            </div>

        </div>

        

    </div>
    <!--/col-md-4-->
</div>
<!--/row-->
<!-- End Info Blokcs -->


<!-- End Our Clients -->
</div>
<!-- End Content Part -->